<?php
class Controllermodulegoogleidentitytoolkit extends Controller {
	protected function index() {
		$this->language->load ( 'module/google_identity_toolkit' );
		$this->data ['heading_title'] = $this->language->get ( 'heading_title' );
		
		$this->data ['code'] = html_entity_decode ( $this->config->get ( 'google_identity_toolkit_code' ) );
		$this->data['position'] = $this->config->get ( 'google_identity_toolkit_position' );
		
		$this->data['logged_email'] = '';
		$this->data['logged_display_name'] = '';
		$this->data['logged_legacy'] = '';
		
		$this->data['logged'] = $this->customer->isLogged();
		if ($this->data['logged']) {
			$this->data['logged_email'] = $this->customer->getEmail();
			$this->data['logged_display_name'] = $this->customer->getFirstName() . ' ' . $this->customer->getLastName();
			// $this->data['logged_legacy'] = $this->customer->getAccountType() == 'LEGACY';
		}
		$this->id = 'google_identity_toolkit';
		
		if (file_exists ( DIR_TEMPLATE . $this->config->get ( 'config_template' ) . '/template/module/google_identity_toolkit.tpl' )) {
			$this->template = $this->config->get ( 'config_template' ) . '/template/module/google_identity_toolkit.tpl';
		} else {
			$this->template = 'default/template/module/google_identity_toolkit.tpl';
		}
		
		$this->render ();
	}
}
?>